<html>
<head>
<title>Collaborative ER Modeling</title>
<script type="text/javascript"   
        src="http://www.google.com/jsapi">
</script>
<script type="text/javascript" 
      src="http://wave-api.appspot.com/public/embed.js">
</script>
<script type="text/javascript">
    google.load("wave", "1");
    google.load("wave", "wave.getState()");
    google.setOnLoadCallback(initializeMultipleWaves);
    var wavePanel;
 	
    function embedWave(frameId, waveId) {
        var waveFrame = document.getElementById(frameId);
        var embedOptions = {target: waveIndivFrame, 
        		            header: true, 
        		            toolbar: true, 
        		            footer: true }; 
        wavePanel = new google.wave.WavePanel(embedOptions);
        
        wavePanel.loadWave(waveId)
      }

/*
    function initialize() {       
       var waveIndivFrame = document.getElementById("waveIndivFrame");
       var embedOptions = {target: waveIndivFrame, header: true, toolbar: true, footer: true }; 
       var waveIndivPanel = new google.wave.WavePanel(embedOptions); 
//       waveIndivPanel.setUIConfig('red','blue', 'courier new', '18px');
       waveIndivPanel.loadWave('googlewave.com!w+hFtnZzwiA'); 
        }
    */
    
    
    function initializeMultipleWaves() {   
      
      embedWave("waveIndivFrame", "googlewave.com!w+l8B1NFHRK");       
        }
    
    function addViewer() {
    	if (wavePanel){
    		wavePanel.addParticipant();
    		alert('You have been added to this wave.');
    	}
    }
    
    
</script>

</head>
 <body> 
	<div id="waveContainer" style="width: 100%; height: 600px">
      <div id="problem" style="width: 100%; height: 50px; float:left">
         <label>Ejercicio sobre ER</label>
      </div> 
	  <div id="waveIndivFrame" style="width: 100%; height: 500px; float:left; clear: right;">
	  <button type="button"
	          onclick="addViewer();">
	          Add coment
	  </button>
	  </div>
	</div>
  </body>




</html>
